<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数的连续性与间断点 - 课程引入</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #e3f2fd, #f3e5f5, #f1f8e9);
            color: #333;
            min-height: 100vh;
            padding: 20px;
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.85);
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(5px);
        }
        
        .container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, #4fc3f7, #9575cd, #81c784);
        }
        
        header {
            text-align: center;
            margin-bottom: 40px;
            padding-bottom: 20px;
            border-bottom: 2px solid rgba(0, 0, 0, 0.1);
        }
        
        h1 {
            font-size: 3.2rem;
            margin-bottom: 15px;
            background: linear-gradient(135deg, #0288d1, #7b1fa2, #388e3c);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        
        .subtitle {
            font-size: 1.5rem;
            color: #555;
            max-width: 800px;
            margin: 0 auto;
            line-height: 1.6;
        }
        
        .intro-section {
            margin-bottom: 50px;
            padding: 30px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 15px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
            transition: transform 0.3s;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }
        
        .intro-section:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
        }
        
        h2 {
            font-size: 2.2rem;
            margin-bottom: 25px;
            color: #0288d1;
            display: flex;
            align-items: center;
            border-left: 5px solid #4fc3f7;
            padding-left: 15px;
        }
        
        h2 i {
            margin-right: 15px;
            font-size: 1.8rem;
        }
        
        .scenario {
            display: flex;
            flex-wrap: wrap;
            gap: 30px;
            margin-bottom: 40px;
        }
        
        .path-card {
            flex: 1;
            min-width: 300px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 15px;
            padding: 25px;
            text-align: center;
            transition: all 0.3s;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(0, 0, 0, 0.05);
        }
        
        .path-card:hover {
            background: rgba(255, 255, 255, 1);
            transform: scale(1.03);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        
        .path-title {
            font-size: 1.8rem;
            margin-bottom: 15px;
            color: #7b1fa2;
        }
        
        .path-image {
            height: 200px;
            background: #f5f5f5;
            border-radius: 10px;
            margin: 20px 0;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        .path-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .path-description {
            margin-bottom: 20px;
            font-size: 1.1rem;
            color: #555;
        }
        
        .path-question {
            font-weight: bold;
            color: #388e3c;
            font-size: 1.2rem;
            margin-top: 15px;
        }
        
        .function-example {
            display: flex;
            flex-wrap: wrap;
            gap: 30px;
            margin-top: 30px;
        }
        
        .function-card {
            flex: 1;
            min-width: 300px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 15px;
            padding: 25px;
            text-align: center;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(0, 0, 0, 0.05);
        }
        
        .function-title {
            font-size: 1.5rem;
            margin-bottom: 15px;
            color: #7b1fa2;
        }
        
        .function-formula {
            font-size: 1.8rem;
            margin: 20px 0;
            font-family: 'Cambria Math', serif;
            color: #0288d1;
        }
        
        .function-canvas {
            height: 200px;
            background: #f9f9f9;
            border-radius: 10px;
            margin: 20px 0;
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        .function-canvas canvas {
            width: 100%;
            height: 100%;
            display: block;
        }
        
        .interaction {
            margin-top: 30px;
            text-align: center;
        }
        
        .interaction-title {
            font-size: 1.5rem;
            margin-bottom: 20px;
            color: #388e3c;
        }
        
        .interaction-instruction {
            margin-bottom: 20px;
            font-size: 1.1rem;
            color: #555;
        }
        
        .gesture-area {
            display: flex;
            justify-content: center;
            gap: 50px;
            margin: 30px 0;
        }
        
        .gesture {
            text-align: center;
        }
        
        .gesture-box {
            width: 120px;
            height: 120px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            font-size: 3rem;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(0, 0, 0, 0.05);
        }
        
        .gesture-box:hover {
            background: rgba(255, 255, 255, 1);
            transform: scale(1.1);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        
        .gesture-label {
            font-size: 1.1rem;
            color: #555;
        }
        
        .questions {
            margin-top: 50px;
            padding: 30px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 15px;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }
        
        .question-list {
            list-style-type: none;
            margin-top: 20px;
        }
        
        .question-list li {
            margin-bottom: 20px;
            padding: 15px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 10px;
            font-size: 1.2rem;
            position: relative;
            padding-left: 50px;
            color: #555;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
        }
        
        .question-list li::before {
            content: '?';
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            width: 30px;
            height: 30px;
            background: #4fc3f7;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }
        
        .role-play {
            margin-top: 50px;
            padding: 30px;
            background: linear-gradient(135deg, rgba(79, 195, 247, 0.2), rgba(149, 117, 205, 0.2));
            border-radius: 15px;
            text-align: center;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }
        
        .role-title {
            font-size: 2rem;
            margin-bottom: 20px;
            color: #7b1fa2;
        }
        
        .role-description {
            font-size: 1.3rem;
            margin-bottom: 30px;
            color: #555;
        }
        
        .doctor-icon {
            font-size: 4rem;
            margin-bottom: 20px;
        }
        
        .conclusion {
            margin-top: 50px;
            text-align: center;
            padding: 30px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 15px;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }
        
        .conclusion-title {
            font-size: 2rem;
            margin-bottom: 20px;
            color: #0288d1;
        }
        
        .conclusion-text {
            font-size: 1.3rem;
            max-width: 800px;
            margin: 0 auto;
            color: #555;
        }
        
        footer {
            text-align: center;
            margin-top: 50px;
            padding-top: 20px;
            border-top: 1px solid rgba(0, 0, 0, 0.1);
            font-size: 1rem;
            color: #777;
        }
        
        @media (max-width: 768px) {
            h1 {
                font-size: 2.5rem;
            }
            
            .subtitle {
                font-size: 1.2rem;
            }
            
            .scenario, .function-example, .gesture-area {
                flex-direction: column;
            }
            
            .path-card, .function-card {
                min-width: 100%;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>函数的连续性与间断点</h1>
            <p class="subtitle">完美的线条 vs 断裂的轨迹 —— 探索函数图像的奥秘</p>
        </header>
        
        <section class="intro-section">
            <h2><i>🏔️</i> 课程引入：生活化情境创设</h2>
            <p style="font-size: 1.3rem; margin-bottom: 30px; text-align: center; color: #555;">想象一下，你正在计划一次周末登山活动...</p>
            
            <div class="scenario">
                <div class="path-card">
                    <div class="path-title">路线A：平缓的盘山公路</div>
                    <div class="path-image">
                        <img src="https://images.unsplash.com/photo-1541888946425-d81bb19240f5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80" alt="平缓的盘山公路">
                    </div>
                    <div class="path-description">
                        这是一条精心设计的盘山公路，坡度平缓，转弯自然。你可以顺畅地一直走到山顶，不需要任何跳跃或停顿。
                    </div>
                    <div class="path-question">你可以用手指一气呵成地画出这条路径吗？</div>
                </div>
                
                <div class="path-card">
                    <div class="path-title">路线B：陡峭的阶梯</div>
                    <div class="path-image">
                        <img src="https://images.unsplash.com/photo-1551632811-561732d1e306?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80" alt="陡峭的登山阶梯">
                    </div>
                    <div class="path-description">
                        这是一条陡峭的登山阶梯，但中间有一段被山洪冲毁了。要到达山顶，你必须在某个点跳跃才能继续前进。
                    </div>
                    <div class="path-question">画这条路径时，你的手指需要抬起来吗？</div>
                </div>
            </div>
            
            <div style="text-align: center; margin-top: 20px;">
                <p style="font-size: 1.3rem; color: #388e3c;">思考：你会选择哪条路线？为什么？</p>
                <p style="margin-top: 15px; font-size: 1.1rem; color: #555;">引导学生说出<strong>"连续"、"不间断"、"顺畅"</strong>等关键词</p>
            </div>
        </section>
        
        <section class="intro-section">
            <h2><i>📊</i> 数学可视化演示</h2>
            <p style="font-size: 1.2rem; margin-bottom: 20px; color: #555;">现在，让我们把这两种路径转化为数学函数：</p>
            
            <div class="function-example">
                <div class="function-card">
                    <div class="function-title">连续函数：y = e<sup>x</sup></div>
                    <div class="function-formula">f(x) = e<sup>x</sup></div>
                    <div class="function-canvas">
                        <canvas id="expCanvas" width="400" height="200"></canvas>
                    </div>
                    <p style="color: #555;">指数函数，处处连续，手指可以沿着线一直画到头</p>
                </div>
                
                <div class="function-card">
                    <div class="function-title">间断函数：y = [x]</div>
                    <div class="function-formula">f(x) = [x]</div>
                    <div class="function-canvas">
                        <canvas id="floorCanvas" width="400" height="200"></canvas>
                    </div>
                    <p style="color: #555;">取整函数，在每个整数点处跳跃间断</p>
                </div>
            </div>
            
            <div class="interaction">
                <div class="interaction-title">动手体验：手指画图</div>
                <div class="interaction-instruction">请大家伸出手指，在空中模仿这两个函数的轨迹：</div>
                
                <div class="gesture-area">
                    <div class="gesture">
                        <div class="gesture-box" onclick="animateGesture(this)">👆</div>
                        <div class="gesture-label">连续函数<br>一气呵成</div>
                    </div>
                    
                    <div class="gesture">
                        <div class="gesture-box" onclick="animateGesture(this)">✋</div>
                        <div class="gesture-label">间断函数<br>需要抬笔</div>
                    </div>
                </div>
                
                <p style="margin-top: 20px; font-style: italic; color: #555;">"第一个可以一气呵成，第二个在每个整数点都需要跳跃"</p>
            </div>
        </section>
        
        <section class="intro-section">
            <h2><i>❓</i> 问题驱动思考</h2>
            <p style="font-size: 1.2rem; margin-bottom: 20px; color: #555;">基于前面的体验，让我们思考以下核心问题：</p>
            
            <div class="questions">
                <ul class="question-list">
                    <li>为什么有些函数图像可以一笔画成，有些却要抬笔多次？</li>
                    <li>函数在哪些点会"断裂"？断裂有哪些不同类型？</li>
                    <li>连续的函数有什么特别有用的性质？</li>
                </ul>
            </div>
        </section>
        
        <section class="role-play">
            <div class="role-title">角色扮演：函数医生</div>
            <div class="doctor-icon">👨‍⚕️</div>
            <div class="role-description">
                今天，我们就来当一回"函数医生"，诊断函数的"健康状态"，
                找出它们的"伤病点"（间断点），并了解健康函数（连续函数）的优良特性！
            </div>
        </section>
        
        <section class="conclusion">
            <div class="conclusion-title">课程预告</div>
            <div class="conclusion-text">
                在本节课中，我们将深入探讨函数的连续性概念，学习如何识别各种类型的间断点，
                并掌握闭区间上连续函数的重要性质。准备好开始这次数学探索之旅了吗？
            </div>
        </section>
        
        <footer>
            <p>函数的连续性与间断点 - 课程引入设计 | 适合大一新生</p>
        </footer>
    </div>

    <script>
        // 绘制指数函数 e^x
        function drawExpFunction() {
            const canvas = document.getElementById('expCanvas');
            const ctx = canvas.getContext('2d');
            const width = canvas.width;
            const height = canvas.height;
            
            // 清空画布
            ctx.clearRect(0, 0, width, height);
            
            // 绘制坐标轴
            ctx.strokeStyle = '#666';
            ctx.lineWidth = 1;
            
            // X轴
            ctx.beginPath();
            ctx.moveTo(0, height/2);
            ctx.lineTo(width, height/2);
            ctx.stroke();
            
            // Y轴
            ctx.beginPath();
            ctx.moveTo(width/2, 0);
            ctx.lineTo(width/2, height);
            ctx.stroke();
            
            // 绘制原点
            ctx.fillStyle = '#ff6b6b';
            ctx.beginPath();
            ctx.arc(width/2, height/2, 4, 0, Math.PI * 2);
            ctx.fill();
            
            ctx.fillStyle = '#ff6b6b';
            ctx.font = '12px Arial';
            ctx.fillText('O', width/2 + 5, height/2 + 15);
            
            // 绘制指数函数 e^x
            ctx.strokeStyle = '#4fc3f7';
            ctx.lineWidth = 3;
            ctx.beginPath();
            
            for (let i = 0; i < width; i++) {
                const x = (i - width/2) / 40;
                const y = -Math.exp(x) * 20 + height/2;
                
                if (i === 0) {
                    ctx.moveTo(i, y);
                } else {
                    ctx.lineTo(i, y);
                }
            }
            
            ctx.stroke();
        }

        // 绘制取整函数 [x]
        function drawFloorFunction() {
            const canvas = document.getElementById('floorCanvas');
            const ctx = canvas.getContext('2d');
            const width = canvas.width;
            const height = canvas.height;
            
            // 清空画布
            ctx.clearRect(0, 0, width, height);
            
            // 绘制坐标轴
            ctx.strokeStyle = '#666';
            ctx.lineWidth = 1;
            
            // X轴
            ctx.beginPath();
            ctx.moveTo(0, height/2);
            ctx.lineTo(width, height/2);
            ctx.stroke();
            
            // Y轴
            ctx.beginPath();
            ctx.moveTo(width/2, 0);
            ctx.lineTo(width/2, height);
            ctx.stroke();
            
            // 绘制原点
            ctx.fillStyle = '#ff6b6b';
            ctx.beginPath();
            ctx.arc(width/2, height/2, 4, 0, Math.PI * 2);
            ctx.fill();
            
            ctx.fillStyle = '#ff6b6b';
            ctx.font = '12px Arial';
            ctx.fillText('O', width/2 + 5, height/2 + 15);
            
            // 绘制取整函数 [x]
            ctx.strokeStyle = '#ff6b6b';
            ctx.lineWidth = 3;
            
            const scale = 30;
            const steps = 5;
            
            for (let i = -steps; i < steps; i++) {
                const startX = width/2 + i * scale;
                const endX = width/2 + (i + 1) * scale;
                const y = height/2 - i * scale;
                
                // 绘制水平线段
                ctx.beginPath();
                ctx.moveTo(startX, y);
                ctx.lineTo(endX, y);
                ctx.stroke();
                
                // 绘制垂直线段（间断部分）
                if (i < steps - 1) {
                    ctx.beginPath();
                    ctx.moveTo(endX, y);
                    ctx.lineTo(endX, y - scale);
                    ctx.stroke();
                }
                
                // 标记整数点
                if (i !== 0) {
                    ctx.fillStyle = '#ff6b6b';
                    ctx.font = '10px Arial';
                    ctx.fillText(i.toString(), width/2 + i * scale - 3, height/2 + 15);
                }
            }
            
            // 标记跳跃间断点
            ctx.fillStyle = '#ff6b6b';
            ctx.font = 'bold 12px Arial';
            ctx.fillText('跳跃间断', width/2 + 50, height/2 - 40);
        }

        // 页面加载时绘制函数
        document.addEventListener('DOMContentLoaded', function() {
            drawExpFunction();
            drawFloorFunction();
            
            const cards = document.querySelectorAll('.path-card, .function-card');
            
            cards.forEach((card, index) => {
                card.style.opacity = '0';
                card.style.transform = 'translateY(20px)';
                
                setTimeout(() => {
                    card.style.transition = 'opacity 0.5s, transform 0.5s';
                    card.style.opacity = '1';
                    card.style.transform = 'translateY(0)';
                }, 300 + index * 200);
            });
        });

        // 手势动画函数
        function animateGesture(element) {
            element.style.transform = 'scale(1.2)';
            element.style.backgroundColor = 'rgba(79, 195, 247, 0.2)';
            
            setTimeout(() => {
                element.style.transform = 'scale(1)';
                element.style.backgroundColor = 'rgba(255, 255, 255, 0.9)';
            }, 300);
        }
    </script>
</body>
</html>